package com.ay.service.impl;


import com.ay.entity.Item;
import com.ay.mapper.ItemMapper;
import com.ay.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ItemServiceImpl implements ItemService {

   @Autowired
    ItemMapper itemMapper;

    @Override
    public Item findById(Integer id) {
        return itemMapper.selectByPrimaryKey(id);
    }

    @Override
    public int save(Item item) {
        return  itemMapper.insertSelective(item);

    }
}
